package com.jzo2o.customer.controller.worker;


import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 服务人员认证信息表 前端控制器
 * </p>
 *
 * @author Echo
 * @since 2025-03-07
 */
@RestController("workerCertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务人员认证信息表")
@RequiredArgsConstructor
public class WorkerCertificationController {
    private final IWorkerCertificationService workerCertificationService;

    @PostMapping()
    @ApiOperation("服务人员提交认证信息")
    public void saveCertification(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertificationService.saveCertification(dto);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("根据服务人员id查询驳回原因")
    public RejectReasonResDTO queryRejectedReason() {
        return workerCertificationService.queryRejectedReason();
    }
}
